package com.li.sssp.handle;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.li.sssp.entity.Actor;
import com.li.sssp.server.ActorService;

import jdk.nashorn.internal.ir.RuntimeNode.Request;

@Controller
@RequestMapping("role")
public class ActorHandle {

	@Autowired
	ActorService actorService;
	@RequestMapping(value="ActorAdd")
	public String Add(){
		return "role/actorAdd";
	}
	
	@RequestMapping(value="actorSave",method=RequestMethod.POST)
	public String Save(Actor actor){
		actorService.save(actor);
		return "redirect:actor";
	}
}
